package com.zzyx.service.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.zzyx.bean.Zhuanjia;
import com.zzyx.dao.ZhuanjiaDAO;
import com.zzyx.service.ZhuanjiaService;

@SuppressWarnings("unchecked")
public class ZhuanjiaServiceImpl implements ZhuanjiaService {
	private ZhuanjiaDAO zhuanjiaDao;

	public ZhuanjiaDAO getZhuanjiaDao() {
		return zhuanjiaDao;
	}

	public void setZhuanjiaDao(ZhuanjiaDAO zhuanjiaDao) {
		this.zhuanjiaDao = zhuanjiaDao;
	}

	public void delete(Zhuanjia e) {
		zhuanjiaDao.delete(e);
	}

	public void deleteAll(Collection<Zhuanjia> c) {
		zhuanjiaDao.deleteAll(c);

	}

	public void deleteById(Class<Zhuanjia> entityClass, Integer id) {
		zhuanjiaDao.deleteById(entityClass, id);

	}

	public List<Zhuanjia> findAll(Class<Zhuanjia> entityClass) {

		return zhuanjiaDao.findAll(entityClass);
	}

	public List<Zhuanjia> findByAll(DetachedCriteria dc) {
		return zhuanjiaDao.findByAll(dc);
	}

	public List<Zhuanjia> findByCriteria(DetachedCriteria dc, int firstResult,
			int maxResult) {
		return zhuanjiaDao.findByCriteria(dc, firstResult, maxResult);
	}

	public List<Zhuanjia> findByCriteria(DetachedCriteria dc) {

		return zhuanjiaDao.findByCriteria(dc);
	}

	public List<Zhuanjia> findByHql(String hql, Map<String, Object> param,
			int firstResult, int maxResult) {
		return zhuanjiaDao.findByHql(hql, param, firstResult, maxResult);
	}

	public Zhuanjia findById(Class<Zhuanjia> entityClass, Integer id) {
		return zhuanjiaDao.findById(entityClass, id);
	}

	public List<Zhuanjia> findByProperty(Class<Zhuanjia> entityClass,
			String propertyName, Object value, int type) {
		return zhuanjiaDao.findByProperty(entityClass, propertyName, value,
				type);
	}

	public Zhuanjia findUniqueResult(String sql) {
		return zhuanjiaDao.findUniqueResult(sql);
	}

	public void save(Zhuanjia entity) {
		zhuanjiaDao.save(entity);
	}

	public void saveOrUpdate(Zhuanjia entity) {
		zhuanjiaDao.saveOrUpdate(entity);

	}

	public void update(Collection<Zhuanjia> c) {
		zhuanjiaDao.update(c);

	}

	public List<Zhuanjia> findByHql(String hql) {
		return zhuanjiaDao.findByHql(hql);
	}

	
	public void update(Zhuanjia zhuanjia) {
		zhuanjiaDao.update(zhuanjia);
		
	}

	
	public void delete(String zhuanjiaIds) {
		zhuanjiaDao.delete(zhuanjiaIds);
	}

	
	public void save(String name, Zhuanjia zhuanjia) {
		zhuanjiaDao.save(name,zhuanjia);
		
	}

	
	public List<Zhuanjia> findByHql(String hql, int start, int max) {
		// TODO Auto-generated method stub
		return zhuanjiaDao.findByHql(hql, start, max);
	}

}
